package pattern.observer.origin;

public class Test {
    public static void main(String[] args) {
        Observable observable = new Subject();
        WeixinUser user1 = new WeixinUser("张三");
        WeixinUser user2 = new WeixinUser("李四");
        WeixinUser user3 = new WeixinUser("王五");
        observable.add(user1);
        observable.add(user2);
        observable.add(user3);
        observable.notify("收到推送");
    }
}
